﻿using System;
using System.Collections.Generic;
using System.Text;

namespace Lonewolf.Infrastructure
{
    public class RandomHelper
    {
        private static char[] constant =
        {
            '0','1','2','3','4','5','6','7','8','9',
            'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k','l', 'm',
            'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z'
        };
        public static string GetRandom(int length)
        {
            StringBuilder builder = new StringBuilder(36);
            Random random = new Random();
            for (int i = 0; i < length; i++)
            {
                builder.Append(constant[random.Next(36)]);
            }
            return builder.ToString();
        }
    }
}
